home *** CD-ROM | disk | FTP | other *** search
- // Initialize graphics mode
- // Michael J. Campbell, 1994
-
- #include <graphics.h>
- #include <stdlib.h>
- #include <stdio.h>
-
- void set_graph(void)
- {
- int gd = DETECT, gm, crash;
-
- registerbgidriver(EGAVGA_driver);
- registerbgifont(small_font);
- initgraph(&gd, &gm, "");
-
- crash = graphresult();
-
- if (crash != grOk) // Opps!
- {
- printf("\aThere is an error: %s\n", grapherrormsg(crash));
- exit(1); // Tell user you're not working
- }
- }
-